function editWowMacro(name, body)
	local macroId
	if GetMacroIndexByName(name) == 0 then
		 macroId = CreateMacro(name, 'INV_MISC_QUESTIONMARK', body, true, true)
	else
		macroId = EditMacro(name, name, nil, body , 1, 1); 
	end
	return macroId
end


function _gen_macro(name)
	local fmtstr =
[[
#showtooltip %s
/run ut.sfstart('%s')
]]
	return string.format(fmtstr, name, name)
end

function macro_sfstart(name)
	editWowMacro(name, _gen_macro(name))
end

function macro_sfstop(name)
	local fmtstr =
[[
#showtooltip %s
/run ut.sfstop('%s')
]]
	local body = string.format(fmtstr, name, name)

	editWowMacro(name, body)
end
